package com.navi.loaddata.core.oracleEntity.array;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by ghost on 2018/3/13.
 */
public class EtlArrayIvCurveVPK implements Serializable {
    private String stepId;
    private String glassId;
    private Date glassEndTime;
    private String siteName;
    private long vd;
    private long seqNo;
    private String paramCollection;
    private String paramName;

    @Column(name = "STEP_ID")
    @Id
    public String getStepId() {
        return stepId;
    }

    public void setStepId(String stepId) {
        this.stepId = stepId;
    }

    @Column(name = "GLASS_ID")
    @Id
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Column(name = "GLASS_END_TIME")
    @Id
    @Temporal(TemporalType.TIMESTAMP)
    public Date getGlassEndTime() {
        return glassEndTime;
    }

    public void setGlassEndTime(Date glassEndTime) {
        this.glassEndTime = glassEndTime;
    }

    @Column(name = "SITE_NAME")
    @Id
    public String getSiteName() {
        return siteName;
    }

    public void setSiteName(String siteName) {
        this.siteName = siteName;
    }

    @Column(name = "VD")
    @Id
    public long getVd() {
        return vd;
    }

    public void setVd(long vd) {
        this.vd = vd;
    }

    @Column(name = "SEQ_NO")
    @Id
    public long getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(long seqNo) {
        this.seqNo = seqNo;
    }

    @Column(name = "PARAM_COLLECTION")
    @Id
    public String getParamCollection() {
        return paramCollection;
    }

    public void setParamCollection(String paramCollection) {
        this.paramCollection = paramCollection;
    }

    @Column(name = "PARAM_NAME")
    @Id
    public String getParamName() {
        return paramName;
    }

    public void setParamName(String paramName) {
        this.paramName = paramName;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EtlArrayIvCurveVPK that = (EtlArrayIvCurveVPK) o;

        if (vd != that.vd) return false;
        if (seqNo != that.seqNo) return false;
        if (stepId != null ? !stepId.equals(that.stepId) : that.stepId != null) return false;
        if (glassId != null ? !glassId.equals(that.glassId) : that.glassId != null) return false;
        if (glassEndTime != null ? !glassEndTime.equals(that.glassEndTime) : that.glassEndTime != null)
            return false;
        if (siteName != null ? !siteName.equals(that.siteName) : that.siteName != null) return false;
        if (paramCollection != null ? !paramCollection.equals(that.paramCollection) : that.paramCollection != null)
            return false;
        if (paramName != null ? !paramName.equals(that.paramName) : that.paramName != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = stepId != null ? stepId.hashCode() : 0;
        result = 31 * result + (glassId != null ? glassId.hashCode() : 0);
        result = 31 * result + (glassEndTime != null ? glassEndTime.hashCode() : 0);
        result = 31 * result + (siteName != null ? siteName.hashCode() : 0);
        result = 31 * result + (int) (vd ^ (vd >>> 32));
        result = 31 * result + (int) (seqNo ^ (seqNo >>> 32));
        result = 31 * result + (paramCollection != null ? paramCollection.hashCode() : 0);
        result = 31 * result + (paramName != null ? paramName.hashCode() : 0);
        return result;
    }
}
